package gov.nasa.anml.lifted;

import gov.nasa.anml.utility.SimpleBoolean;
import gov.nasa.anml.utility.SimpleObject;
import gov.nasa.anml.utility.SimpleString;
import gov.nasa.anml.utility.SimpleVoid;

public class LabeledExpression extends TimeOfExpression implements
		LabeledInterval<SimpleBoolean, SimpleVoid> {

	public SimpleString name;
	public int id;
	
	public LabeledExpression() {
		super();
		name = null;
		id = -1;
	}
	
	public LabeledExpression(SimpleString n) {
		super();
		name = n;
		id = -1;
	}
	
	public LabeledExpression(SimpleString n,Expression<SimpleBoolean,?> e) {
		super(e);
		name = n;
		id = -1;
	}
	
	public int id() {
		return id;
	}

	public Identifier<SimpleBoolean,SimpleVoid> id(int id) {
		this.id = id;
		return this;
	}

	public IdentifierCode idCode() {
		return IdentifierCode.Label;
	}

	public SimpleString name() {
		return this.name;
	}

	public Identifier<SimpleBoolean, SimpleVoid> name(SimpleString name) {
		this.name = name;
		return this;
	}

	public int compareTo(Identifier<SimpleBoolean, SimpleVoid> o) {
		return this.id - o.id();
	}

}
